<template>
	<view class="wf-box">
		<HeadNav titleName="管理钱包" :navBarHeight="navBarHeight"></HeadNav>
		
		<view class="main" :style="{ paddingTop: navBarHeight }">
			<view class="f-row">
				<image src='../../static/img/demo-04.png' class="wallet-img"></image>
				<text>0x6c92...BFAC</text>
				<image src="../../static/img/sign-05.png" class="copy-img"></image>
			</view>
			<view class="ot-box">
				<view class="ot-im">
					<image src="../../static/img/me-29.png" class="ot-img"></image>
					<text>备份助记词</text>
					<image src="../../static/img/chat-20.png" class="ot-more"></image>
				</view>
				
				<view class="ot-im">
					<image src="../../static/img/me-30.png" class="ot-img"></image>
					<text>备份私钥</text>
					<image src="../../static/img/chat-20.png" class="ot-more"></image>
				</view>
				
				<view class="op-row">助记词与私钥是唯一恢复钱包的工具，请确保您已知悉， 否则将面临丢失所有资产的风险！</view>
			
				<view class="ot-im" @click="openPopup">
					<image src="../../static/img/me-31.png" class="ot-img"></image>
					<text>删除此钱包</text>
					<image src="../../static/img/chat-20.png" class="ot-more"></image>
				</view>
				<view class="op-row">删除钱包后将不再显示资产，若您想恢复，请确保助记词 与私钥已经完整备份，否则将面临丢失所有资产的风险！</view>
			</view>
		</view>
		
		<uni-popup ref="popup" type="center">
			<view class="popup-box">
				<view class="popup-title">是否确定要删除钱包？</view>
				<view class="popup-sub">请确保您已备份此钱包。</view>
				<view class="popup-footer">
					<view class="cancle" @click="closePopup()">取消</view>
					<view class="confim">确定</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import HeadNav from "@/components/HeadNav"
	import navBarMixin from '@/mixin/navBarMixin.js'
	export default {
		data() {
			return {}
		},
		components: {
			HeadNav
		},
		mixins: [navBarMixin],
		methods: {
			back() {
				uni.navigateBack()
			},
			openPopup() {
				this.$refs.popup.open()
			},
			closePopup() {
				this.$refs.popup.close()
			}
		}
		
	}
</script>

<style lang="scss" scoped>
	.wf-box {
		overflow: hidden;
		
		.back {
			image {
				width: 20rpx;
				height: 37rpx;
			}
		}
		
		.head {
			position: fixed;
			z-index: 1;
			width: 100%;
			background: #fff;
		
			.head-np {
				display: flex;
				justify-content: space-between;
				align-items: center;
				width: 100%;
				height: 96rpx;
				padding: 0 30rpx;
				box-sizing: border-box;
		
				.title {
					font-size: 36rpx;
					font-weight: bold;
				}
			}
		}
		.main {
			margin-top: 126rpx;
			padding: 0 30rpx;
			.f-row {
				height: 182rpx;
				display: flex;
				align-items: center;
				padding: 0 30rpx;
				border-radius: 10rpx;
				background: #fff;
				.wallet-img {
					width: 64rpx;
					height: 64rpx;
				}
				text {
					margin-left: 20rpx;
				}
				.copy-img {
					margin-left: auto;
					width: 48rpx;
					height: 48rpx;
				}
			}
			.ot-box {
				margin-top: 30rpx;
				min-height: 855rpx;
				padding: 30rpx;
				padding-top: 0;
				box-sizing: border-box;
				border-radius: 10rpx;
				background: #fff;
				.ot-im {
					display: flex;
					align-items: center;
					height: 108rpx;
					border-bottom: 2rpx solid #eee;
					.ot-img {
						width: 48rpx;
						height: 48rpx;
					}
					text {
						margin-left: 20rpx;
						color: #333;
					}
					.ot-more {
						margin-left: auto;
						width: 10rpx;
						height: 20rpx;
					}
				}
				.op-row {
					margin-top: 20rpx;
					font-size: 24rpx;
					color: #999999;
				}
			}
		}
	
		.popup-box {
			width: 560rpx;
			// height: 528rpx;
			padding: 0 50rpx;
			padding-top: 140rpx;
			padding-bottom: 40rpx;
			border-radius: 20rpx;
			box-sizing: border-box;
			background: #fff;
			// background: url('../../static/img/me-32.png') no-repeat;
			// background-size: 100% 100%;
			.popup-title {
				font-size: 32rpx;
				color: #333;
				font-weight: bold;
				text-align: center;
			}
			.popup-sub {
				margin-top: 36rpx;
				color: #666;
				font-size: 28rpx;
				text-align: center;
			}
			.popup-footer {
				display: flex;
				justify-content: space-between;
				margin-top: 70rpx;
				.cancle {
					width: 200rpx;
					line-height: 76rpx;
					text-align: center;
					border: 2rpx solid #3F93FF;
					border-radius: 40rpx;
				}
				.confim {
					width: 200rpx;
					line-height: 76rpx;
					text-align: center;
					border-radius: 40rpx;
					background: #3F93FF;
					color: #fff;
				}
			}
		}
	}
</style>